﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.S.DataBase.MyProject.Infrastructure.Migrations
{
    public partial class zwl3表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Billingders",
                columns: table => new
                {
                    Bid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    BillingStae = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    Billingtopic = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Billingtype = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    BillingDate = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Billingsale = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    BillTicket = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    number = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    remark = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Billingders", x => x.Bid);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "OrdersSeles",
                columns: table => new
                {
                    Orid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    OrdStae = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    Ordstopic = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OrdstopName = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OrdstopTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Ordstopamount = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Theamount = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Tinvoice = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Ordremark = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_OrdersSeles", x => x.Orid);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "urchaseOrdps",
                columns: table => new
                {
                    Urcid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    UrcStae = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    Urcic = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UrcName = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UrcTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Urcamount = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Urceamount = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Urcinvoice = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Urcremark = table.Column<string>(type: "longtext", nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_urchaseOrdps", x => x.Urcid);
                })
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Billingders");

            migrationBuilder.DropTable(
                name: "OrdersSeles");

            migrationBuilder.DropTable(
                name: "urchaseOrdps");

            migrationBuilder.DropColumn(
                name: "AvailableProduce",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "Inventorys",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PId",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsBrand",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsCode",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsId",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsLoss",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsName",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsNum",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsType",
                table: "BomInfo");

            migrationBuilder.DropColumn(
                name: "PartsUnit",
                table: "BomInfo");
        }
    }
}
